﻿using System;
using System.Linq;
using System.Linq.Expressions;
using Tyshka.Subroutines.Domain.Entities;

namespace Tyshka.Subroutines.Domain.Abstract
{
    public interface IRepository<T> where T : class, IEntity
    {
        T Read(Int64 id);
        IQueryable<T> Query();
        IQueryable<T> Query(Expression<Func<T, Boolean>> filter);
        void Create(T entity);
        void Delete(T entity);
        void Update(T entity);
    }
}
